__author__ = 'zoulida'

from pytdx.hq import TdxHq_API
from pytdx.params import TDXParams
api = TdxHq_API()
if api.connect('119.147.212.81', 7709):
    # ... same codes...
    #data = api.get_minute_time_data(1, '600300')
    #data = api.get_security_quotes([(0, '000001'), (1, '600300')])
    #data  = api.get_security_list(1, 0)
    #data = api.get_history_transaction_data(1, '000001', 0, 10000, 20210209)
    #data = api.get_history_minute_time_data(TDXParams.MARKET_SH, '600300', 20161209)
    #data = api.get_transaction_data(TDXParams.MARKET_SZ, '000001', 1000, 20000)
    data = api.get_security_list(1, 15000)
    api.disconnect()

print(api.to_df(data))


